package com.tledu.zyf.boot;

import java.io.IOException;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;

//声明为启动类
/**
 * 管理包下所有的Component注解,包含Component的子注解,比如Service,Controller等
 */
@SpringBootApplication
@ComponentScan(basePackages = { "com.tledu.zyf" })
public class ApplicationBootController {

	public static void main(String[] args) {
		// 启动
		SpringApplication.run(ApplicationBootController.class, args);
		// 获取当前操作系统 Windows 10
		// String osName = System.getProperty("os.name");
		// System.out.println(osName);
		try {
			Runtime.getRuntime()
					.exec("rundll32 url.dll,FileProtocolHandler http://127.0.0.1:8080/tledu");
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

}
